- 2 minutes to read

Formula - isnull

New 6.1

isnull('Expression',Content) Formula function used to check if a value is null or has only whitespaces, if so, return a default value, otherwise return the value

Quick example

Let's get you started with the following example:

Input Expression Result

  { "name": "John Doe"}


isnull(jsonpath('missingname',body), 'Jane Doe')



isnull(jsonpath('name',body), 'Jane Doe')


Jane Doe



John Doe

Text Data isnull expression Unique values

Features

  • Check if the result from previous formula expressions yields empty data, or not.
    • Return either the value or a default value
  • Can be applied to any valid Content that returns text/string; Like jsonpath, xpath functions, review Formula user guide for the complete list of functions.

This plugin loads the entire message into RAM, so make sure to apply this function only on small messages.

How to use

To use the isnull function, the Content parameter should contain text/string But first and foremost we have to configure the Formula plugin:

  • Select Formula as the expression type plugin.
  • Write down the expression to use in the 'Expression' text area.
  • Input proper Content as a parameter to the function.

Syntax

Use the isnull function with the following parameters:

isnull(expression, 'Default Value')


Next Step

How to Add or manage Search Fields
How to Add or manage Log Views

Expression Type Plugins are used in Search Fields
What are Search Fields?
What are Search Field Expressions?
What are Message Types?
What are Log Views?